-- GENERATED SPELL FOR [Lefty] --


function spell0_16049(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_16049', 598, 1)
end

function spell1_16049(pUnit, Event) --@Initiate Secret Technique,Self--
pUnit:FullCastSpellOnTarget(27672,pUnit)
pUnit:RegisterEvent('Sorts_16049', 5000, 1)
end

function spell2_16049(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16049', 2268, 1)
end

function spell3_16049(pUnit, Event) --@Snap Kick,n/a--
pUnit:FullCastSpellOnTarget(27620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16049', 4341, 1)
end

function Sorts_16049(pUnit, Event)
local choix_sorts_16049 = math.random(0, 3)
if choix_sorts_16049 == 0 then
pUnit:RegisterEvent('spell0_16049', 1, 1)
end
if choix_sorts_16049 == 1 then
pUnit:RegisterEvent('spell1_16049', 1, 1)
end
if choix_sorts_16049 == 2 then
pUnit:RegisterEvent('spell2_16049', 1, 1)
end
if choix_sorts_16049 == 3 then
pUnit:RegisterEvent('spell3_16049', 1, 1)
end
end

function mob16049_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16049', math.random(1500, 3000), 1)
end

function mob16049_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16049_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16049_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16049, 1, 'mob16049_Action')
RegisterUnitEvent(16049, 2, 'mob16049_Leave')
RegisterUnitEvent(16049, 3, 'mob16049_Kill')
RegisterUnitEvent(16049, 4, 'mob16049_Die')
